package com.eascs.web.o2o.scheduler.task;

import javax.inject.Inject;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.web.o2o.scheduler.service.OaSynchroService;

/**
 * OA同步任务--数据中心、业务系统、工作流系统
 * @author ycz
 *
 */
@Component("oaSynchroTask")
public class OaSynchroTask {
	
	protected final Logger logger = LoggerFactory.getLogger(getClass());

	@Inject
	private OaSynchroService oaSynchroService;
	
	
	/**
	 * 同步员工审核人表
	 */
	@Scheduled(cron = "0 00 1 * * ?")
	public void synchroHrEmployeeAuditor(){
		oaSynchroService.synchroEmployeeAuditor();
	}
	
	/**
	 * 同步组织部门
	 */
	@Scheduled(cron = "0 00 2 * * ?")
	public void synchroHrOrgan(){
		oaSynchroService.sycnHrOrgan();
	}
}
